﻿@model XoohooViewModelItem<ModuleMenuItemList>
<!DOCTYPE html>
<html>
<head>
    <title>@Html.SiteTitle("系统管理")</title>
    @Html.SiteKeywords()
    @Html.SiteDescription()
    @{Html.RenderFavIcon();}
    @{Html.RenderScriptTag("Scripts/jquery.min.js");}
    @{Html.RenderScriptTag("Scripts/jquery-ui.min.js");}
    @{Html.RenderCssFile("Styles/JqueryUI/jquery-ui.css");}
    @{Html.RenderCssFile("Styles/Index.css");}
    <script language="javascript" type="text/javascript">
        if (top != self) {
            top.location = self.location;
        }

        $(document).ready(function () {
            //主菜单样式控制
            $("#mainMenu li").addClass("up");
            $("#mainMenu li").hover(
			    function () {
			        $(this).removeClass().addClass("over");
			    },
			    function () {
			        $(this).removeClass().addClass("up");
			    }
	        );
            //主菜单链接控制
            $("#mainMenu li a").click(function () {
                var contentUrl = $(this).attr("contentUrl");
                if (contentUrl != undefined && contentUrl != "" && $("#frmContent").attr("src") != contentUrl)
                    $("#frmContent").attr("src", contentUrl);
            });

            //子菜单显示控制器
            $("#showController").toggle(
                function () {
                    $("#subMenuContainer").hide();
                    $("#frmSubMenu").attr("width", 0);
                    $(this).removeClass().addClass("controlHide");
                    pagestyle();
                }, function () {
                    $("#subMenuContainer").show();
                    $("#frmSubMenu").attr("width", 200);
                    $(this).removeClass().addClass("controlShow");
                    pagestyle();
                }
            );
            //注册内容部分加载事件
            $("#frmContent").load(pagestyle);
            //注册窗体改变大小事件
            $(window).resize(pagestyle);
            //处理第一次加载时IE6
            pagestyle();
        });

        var pagestyle = function () {
            var lframe = $("#frmSubMenu");
            var rframe = $("#frmContent");
            var wh = document.documentElement.clientHeight - 72;
            var wd = document.documentElement.clientWidth - lframe.attr("width") - 8 - 20;

            lframe.attr("height", wh);
            $("#showController").css("width", "8px");
            rframe.attr("height", wh);
        }
    </script>
</head>
<body>
    <div id="indexTop">
        <div id="logo">
        </div>
        <div id="logoSplit">
        </div>
        <div id="mainInfo">
        </div>
        <div id="userInfo">
            @{Html.RenderPartialFromSkin("_UserLoginInfo");}
        </div>
        <div id="mainMenu">
            <ul>
                @{foreach (var item in Model.Item)
                  {
                    <li><a href="@Url.RouteUrl(item.SubMenuRouteName)" target="frmSubMenu" contentUrl="@Url.RouteUrl(item.ContentRouteName)">@item.Title</a></li>
                  }
                }
            </ul>
        </div>
    </div>
    <div id="splitLine">
    </div>
    <table id="indexMain" cellpadding="0" cellspacing="0">
        <tr>
            <td id="subMenuContainer">
                <iframe id="frmSubMenu" name="frmSubMenu" src="@Url.RouteUrl("Admin.SubMenu")" width="200" height="650" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="auto">
                </iframe>
            </td>
            <td id="showController" class="controlShow">
            </td>
            <td id="contentContainer">
                <iframe id="frmContent" name="frmContent" src="@Url.RouteUrl(ViewBag.Welcome)" width="100%" height="650" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="auto">
                </iframe>
            </td>
        </tr>
    </table>
</body>
</html>
